class CreateCategories < ActiveRecord::Migration
  def self.up
    create_table :categories do |t|
      t.column "label", :string
      t.timestamps
    end
    
    create_table :books_categories do |t|
      # comment ne pas générer l'id ?
      t.column "book_id", :integer
      t.column "category_id", :integer
    end
  end

  def self.down
    drop_table :categories
    drop_table :books_categories
  end
end
